<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"/var/www/html/CRM/public/../application/admin/view/teachp/wish1.html";i:1541073309;}*/ ?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>行家-有点</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css" />
<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
	<script type="text/javascript" src="/admin/layer/layer.js"></script>
<script type="text/javascript" src="/admin/laydate/laydate.js"></script>
</head>
<style>
	.vsAdd{
		display: inline-block;
		width: 70px;
		height: 25px;
		border-radius: 8px;
		background-color: #2a9cdd;
		line-height: 25px;
		color: #fff;
		cursor: pointer;
		text-align: center;
	}
	.td{
		height:40px;
	}

	/*分页样式*/
	.pagination>li{
		float: left;
		text-align: center;
		border-radius: 5px;
	}
	.pagination>li:hover{
		background-color: #47a4e1;
	}
	.pagination>li:hover>span{
		color: white;
	}
	.pagination>li>a{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination>li>span{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		color: #47a4e1;
		font-weight: bold;
		font-size: 18px;
	}
	.pagination>li.disabled{
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination{
		width:auto;
		height: 100%;
		margin: 0 auto;
	}
</style>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">教务部开发</a>&nbsp;-</span>&nbsp;php开发
			</div>
		</div>

		<div class="page">
			<!-- banner页面样式 -->
			<div class="connoisseur">
				<div class="conform">
						<div class="cfD">
							<a class="addA" style="margin-top: 0;margin-left: 0;" href="<?php echo url('admin/teachp/teachpadd'); ?>">添加项目组</a>
						</div>
				</div>
				<!-- banner 表格 显示 -->
				<div class="conShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="135px" class="tdColor tdC">序号</td>
							<td width="145px" class="tdColor">项目组名称</td>
							<td width="140px" class="tdColor">前端带课讲师</td>
							<td width="140px" class="tdColor">php带课讲师</td>
							<td width="140px" class="tdColor">开组时间</td>
							<td width="140px" class="tdColor">开组状态</td>
							<td width="150px" class="tdColor">修改开组状态</td>
							<td width="150px" class="tdColor">操作</td>
						</tr>
                        <?php if(is_array($result) || $result instanceof \think\Collection || $result instanceof \think\Paginator): $i = 0; $__LIST__ = $result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
						<tr class="td">
							<td><?php echo $key+1; ?></td>
							<td><?php echo $vo['pro_name']; ?></td>
							<td><?php echo $vo['pro_teacher']; ?></td>
							<td><?php echo $vo['pro_assit_teacher']; ?></td>
							<td><?php echo date("Y-m-d",$vo['pro_createtime']); ?></td>
							<td><span><?php echo $vo['pro_date']; ?></span></td>
							<td id="list">
								<?php if($vo['pro_date'] == 1): ?>
								<a onClick="member_stop(this,'<?php echo $vo['pro_id']; ?>')" href="javascript:;" title="修改"
								   class="vsAdd"><label>修改状态</label></a>
								<?php else: ?>
								<a style="text-decoration:none" class="vsAdd" onClick="member_start(this,'<?php echo $vo['pro_id']; ?>')" href="javascript:;" title="启用"><label>修改状态</label></a>
								<?php endif; ?>
							</td>
							<td>
								<a href="<?php echo url('admin/teachp/detaile',['pro_id'=>$vo['pro_id']]); ?>" class="vsAdd">查看详情</a>
								<a class="vsAdd" onclick="del(id=<?php echo $vo['pro_id']; ?>)">删除</a>
							</td>
						</tr>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
					</table>
					<div class="paging" style="margin-top: 20px; height: 2rem;">
						<?php echo $result->render(); ?>
					</div>
				</div>
				<!-- banner 表格 显示 end-->
			</div>
			<!-- banner页面样式end -->
		</div>

	</div>


	<!-- 删除弹出框 -->
	<div class="banDel">
		<div class="delete">
			<div class="close">
				<a><img src="/admin/img/shanchu.png" /></a>
			</div>
			<p class="delP1">你确定要删除此条记录吗？</p>
			<p class="delP2">
				<a href="#" class="ok yes">确定</a><a class="ok no">取消</a>
			</p>
		</div>
	</div>
	<!-- 删除弹出框  end-->
</body>

<script type="text/javascript">
// 广告弹出框
$(".delban").click(function(){
  $(".banDel").show();
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
<script>
    function del(id) {
        layer.confirm('确认要删除吗？', function () {
            $.get("<?php echo url('admin/teachs/del'); ?>",{'id':id},function (data) {
                if (data.msg == 200) {
                    layer.msg('已删除!', {icon: 1, time: 1000});
                    location.reload();
                } else{
                    layer.msg('删除失败!', {icon: 5, time: 1000});
                }
            },'json')
        });
    }

	/*用户-停用*/
    function member_stop(obj, id) {
        layer.confirm('确认要停用吗？', function () {
            $.get("<?php echo url('admin/teachs/ban'); ?>",{'id':id},function (data) {
                if(data.msg == 200){
//                      layer.msg('已停用!', {icon: 5, time: 3000});
                    location.reload();
                }
            },'json')
        });
    }
	/*用户-启用*/
    function member_start(obj, id) {
        layer.confirm('确认要启用吗？', function () {
            $.get("<?php echo url('admin/teachs/ban'); ?>",{'id':id},function (data) {
                if (data.msg==200){
//                      layer.msg('已启用!', {icon: 6, time: 3000});
                    location.reload();
                }
            },'json')
        });
    }
</script>
</html>